package com.community.process._1010.domains;

import com.community.process._1010.common.api.InPage;
import com.community.process._1010.dao.vo.ProcessFoodItemIngredientsVo;
import com.community.process._1010.dao.vo.ProcessFoodItemVo;
import com.oneadds.lowcode.BaseQuery;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @Description: 成品菜食材
 * @Author: Administrator to Zbs
 * @Date: 2024/9/6 星期五 15:37
 */
public class ProcessFoodItemIngredientsDTO {

    @Getter
    @Setter
    public static class FoodItemIngredientsPageSearch extends InPage {

        @Schema(description = "食材名称")
        private String name;

        @Schema(description = "成品菜ID")
        @NotNull(message = "成品菜ID不能为空")
        private Long foodItemId;
    }

    @Getter
    @Setter
    public static class FoodItemIngredientsBase {
        @Schema(description = "食材ID")
        @NotNull(message = "食材ID不能为空")
        private Long ingredientsId;

        @Schema(description = "重量，食材的单位为主，比如重量 1，食材的单位是g，那就是1g，单位是kg，那就是1kg")
        @NotNull(message = "重量不能为空")
        private Integer weight;
    }

    @Getter
    @Setter
    public static class IngredientsFoodItemAdd extends FoodItemIngredientsBase {

    }

    @Getter
    @Setter
    public static class FoodItemIngredientsAdd  extends FoodItemIngredientsBase {

        @Schema(description = "成品菜ID")
        @NotNull(message = "成品菜ID不能为空")
        private Long foodItemId;
    }

    @Getter
    @Setter
    public static class FoodItemIngredientsUpdate  extends FoodItemIngredientsBase  {

        @Schema(description = "菜品食材列表ID")
        private Long id;

        @Schema(description = "食材ID")
        @NotNull(message = "食材ID不能为空")
        private Long ingredientsId;

        @Schema(description = "重量，食材的单位为主，比如重量 1，食材的单位是g，那就是1g，单位是kg，那就是1kg")
        @NotNull(message = "重量不能为空")
        private Integer weight;

    }

    @Getter
    @Setter
    public static class FoodItemIngredientsDelete {

        @Schema(description = "菜品食材列表ID")
        private List<Long> ids;

    }
}
